package com.myCinema.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.myCinema.dao.impl.CategoryDaoImpl;
import com.myCinema.entity.Category;
import com.myCinema.struts2.Action;

public class CateListAction implements Action {

	public String execute(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		List<Category> list = new CategoryDaoImpl().getList();
		request.setAttribute("category", list);
		return "success";
//		request.getRequestDispatcher("categoryList.jsp").forward(request, response);
	}

}
